﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Html5Music.Data;

namespace MusicForMvc3.Method.Data
{
    public class GetPlaylistByKey : Cache.CacheBase<GetPlaylistByKey, Html5Music.Model.PlayList>
    {
        public GetPlaylistByKey(PlayListData playList)
        {
            _playList = playList;
        }
        private PlayListData _playList = null;

        [Cache.CacheKey]
        public string Key { get; set; }

        public override Html5Music.Model.PlayList GetObject()
        {
            return _playList.GetByKey(Key);
        }
    }
}